<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\ManageRole;
use App\Models\Role;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use function App\Helpers\successMsg;

//后台管理权限控制
class AuthController extends Controller
{
    //获取到用户角色
    public function getUserRole(Request $request)
    {
        $manage_id = $request->manage_id ?? null;
        $data = Role::getManageRole($manage_id);
        return successMsg($data);
    }
    public function index(Request $request)
    {
        $manage_id = $request->manage_id ?? null;
        $data = Role::getManageRole($manage_id);
        return successMsg($data);
    }
}
